<?php

declare(strict_types=1);
/**
 * This file is part of habo_new_media.
 *
 * @link     https://www.berlen.cn/
 * @contact  tech@berlen.cn
 * @license  http://gitlab.rehou.cn/habo/habo_new_media/-/blob/master/README.md
 */
namespace app\command;

use app\service\ImplementTaskService;
use think\console\Input;
use think\console\Output;

class InitTaskListWork extends BaseWork
{
    protected function configure()
    {
        // 指令配置
        $this->setName('init_task_list_work');
        // 设置参数
        $this->setDescription('生成计划任务的账户队列');
    }

    protected function execute(Input $input, Output $output)
    {
        // 指令输出
        set_time_limit(0);
        ImplementTaskService::setAdvIdsForTask();
        $output->writeln('success' . date('Y-m-d H:i:s'));
    }
}
